<template>
  <div class="company-home">
    <el-container>
      <el-header>
        <el-row :gutter="20">
          <el-col :span="22"><el-menu
            :default-active="activeIndex"
            router
            class="el-menu-demo"
            mode="horizontal"
            background-color="#545c64"
            text-color="#fff"
            active-text-color="#5DD4C7"
            @select="handleSelect"
          >
            <el-menu-item index="/companyHome/employeeManager">职位管理</el-menu-item>
            <el-menu-item index="/companyHome/managerCenter">信息中心</el-menu-item>
            <el-menu-item index="/companyHome/recruitUser">求职者招聘</el-menu-item>
          </el-menu>
          </el-col>
          <el-col :span="2">
            <el-avatar style="margin-top: 10px;" shape="square" size="large" :src="squareUrl" />
          </el-col>
        </el-row>
      </el-header>
      <el-main>
        <router-view />
      </el-main>
    </el-container>
  </div>

</template>

<script>
export default {
  name: 'CompanyHome',
  data() {
    return {
      activeIndex: '/companyHome/employeeManager',
      squareUrl: 'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=4275424924,2201401076&fm=111&gp=0.jpg'
    }
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>

<style scoped lang="scss">
  .el-header, .el-footer {
    padding: 0 0;
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }

  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 160px;
  }

  body > .el-container {
    margin-bottom: 40px;
  }

  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }

  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
</style>
